import java.io.FileInputStream;
import java.io.ObjectInputStream;

public class Main02 {

    public static void main(String[] args) {
        //反序列化：将文件转变为二进制，并进行解析
        //
        MyClass address = new MyClass();
        try {
            FileInputStream fin = new FileInputStream("address.txt");
            ObjectInputStream ois = new ObjectInputStream(fin);
            address = (MyClass) ois.readObject();
            ois.close();
            System.out.println(address); // Street : wall street
        } catch (Exception ex) {
            ex.printStackTrace();
        }

    }
}
